import Layout from '@/views/layout'

export default {
  path: '/settings',
  name: 'settings',
  component: Layout,
  redirect: '/settings/dict',
  meta: {
    title: '配置管理',
    icon: 'nested',
    perm: 'm:settings',
    sort: 7
  },
  children: [
    {
      path: '/settings/dict',
      name: 'settingsDictList',
      component: () => import('@/views/settings/dict/list'),
      meta: {
        title: '字典管理',
        icon: 'table',
        perm: 'm:settings:dict'
      }
    },
    {
      path: '/settings/city',
      name: 'settingsCity',
      component: () => import('@/views/settings/city/list'),
      meta: {
        title: '城市列表',
        icon: 'table',
        perm: 'm:settings:city'
      }
    },
    {
      path: '/settings/sys',
      name: 'settingsSys',
      component: () => import('@/views/settings/sys/list'),
      meta: {
        title: '系统参数',
        icon: 'table',
        perm: 'm:settings:sys'
      }
    },
    {
      path: '/settings/charging',
      name: 'settingsCharging',
      component: () => import('@/views/common/index'),
      meta: {
        title: '计费管理',
        icon: 'nested',
        perm: 'm:settings:charging'
      },
      children: [
        {
          path: '/settings/charging/share',
          name: 'chargingShare',
          component: () => import('@/views/settings/charging/share/list'),
          meta: {
            title: '时租计费',
            icon: 'table',
            perm: 'm:settings:charging:share'
          }
        },
        {
          path: '/settings/charging/rent',
          name: 'chargingRent',
          component: () => import('@/views/settings/charging/rent/list'),
          meta: {
            title: '长租计费',
            icon: 'table',
            perm: 'm:settings:charging:rent'
          }
        }
      ]
    }
  ]
}
